/**
 * Created by Administrator on 2016/12/29.
 */
/*
 * 引入http模块目的：就是为了去搭建一个web服务器. + express
 * */
var http = require("http");

var port = 3000;
var host = "127.0.0.1";

http.createServer(function(req,res){
    res.writeHead(200,{"Content-Type":"text/html;charset=utf-8"});
    res.end("<!DOCTYPE html>"+
        "<html lang='en'>"+
        "<head>"+
        "    <meta charset='UTF-8'>"+
        "    <title>Title</title>"+
        "</head>"+
        "<body>"+
        "    <form action='/xxxx'>"+
        "        <p>用户名：<input type='text'></p>"+
        "        <p>密码：<input type='text'></p>"+
        "        <p><input type='button' value='登录'></p>"+
        "    </form>"+
        "</body>"+
        "</html>");

}).listen(port,host);
console.log("当前服务器已经打开：端口是：3000");
